#include <bits/stdc++.h>
using namespace std;
//#define int long long
const int maxn = (1LL<<16)+10;
int a[maxn];

void query(const string& s, int i, int j, int& res){
    cout << s << ' ' << i << ' ' << j << endl;
//    cout.flush();
    cin >> res;
    if(res == -1)
        exit(0);
}

int32_t main() {
    ios::sync_with_stdio(false);
    int n; cin >> n;
    int x, y, z, t;
    int X[maxn];
    for (int i = 2; i <= n; ++i) {
        query("XOR", 1, i, X[i]);
    }
    query("AND", 1, 2, t);
    x = X[2] + 2*t;

    query("AND", 1, 3, t);
    y = X[3] + 2*t;

    int xor23 = X[2] ^ X[3];
    query("AND", 2, 3, t);
    z = xor23 + 2*t;

    a[1] = (x+y-z)/2;
    for (int i = 2; i <= n; ++i) {
        a[i] = a[1] ^ X[i];
    }
    cout << "! ";
    for (int i = 1; i <= n; ++i) {
        cout << a[i]<<' ';
    }
    cout << endl;
    cout.flush();

    return 0;
}